package com.zhuangjie.shop.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zhuangjie.mvc.validator.annotate.PhoneNumber;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 商店基本信息
 *
 * @author zhuangjie
 * @date 2024/03/06
 */
@Data
public class ShopBasicInfo {

    @ApiModelProperty(value = "店铺名称")
    @TableField("name")
    @Size(min=2, message = "店铺名称不能少于2个字符")
    private String name;

    @ApiModelProperty(value = "手机号码")
    @TableField("phone")
    @PhoneNumber
    private String phone;


    @ApiModelProperty(value = "店铺logo")
    @TableField("logo")
    @Pattern(regexp="^http.*", message="logo的值必须以http开头")
    private String logo;

    @ApiModelProperty(value = "背景海报/店内环境图片")
    @TableField("background_poster")
    @Pattern(regexp="^http.*", message="背景海报的值必须以http开头")
    private String backgroundPoster;

    @ApiModelProperty(value = "店铺公告")
    @TableField("notice")
    private String notice;

    @ApiModelProperty(value = "口号（flags）,每个flag间逗号隔开")
    @TableField("flags")
    private String flags;

}
